Method of controlling a motorized window treatment

ABSTRACT

A method comprises measuring a light intensity at a window; determining if the light intensity exceeds a cloudy-day threshold; operating in a sunlight penetration limiting mode to control the motorized window treatment to control the sunlight penetration distance in the space; enabling the sunlight penetration limiting mode if the light intensity is greater than the cloudy-day threshold; and disabling the sunlight penetration limiting mode if the total lighting intensity is less than the cloudy-day threshold. The cloudy-day threshold is maintained at a constant threshold if a calculated solar elevation angle is greater than a predetermined solar elevation angle, and the cloudy-day threshold varies with time if the calculated solar elevation angle is less than the predetermined solar elevation angle. The cloudy-day threshold is a function of the calculated solar elevation angle if the calculated solar elevation angle is less than the predetermined solar elevation angle.

This application claims the benefit of U.S. Provisional Patent Application No. 61/731,844, filed Nov. 30, 2012 which is incorporated by reference herein, in its entirety.

FIELD

The present invention relates to a load control system for controlling a plurality of motorized window treatments in a space, and more particularly, to a procedure for automatically controlling one or more motorized window treatments to prevent direct sun glare on work spaces in the space.

BACKGROUND

Motorized window treatments, such as, for example, motorized roller shades and draperies, provide for control of the amount of sunlight entering a space. Some prior art motorized window treatments have been automatically controlled in response to various inputs, such as daylight sensors and timeclocks, to control the amount of daylight entering a space to adjust the total lighting level in the space to a desired level. For example, the load control system may attempt to maximize the amount of daylight entering the space in order to minimize the intensity of the electrical lighting in the space. In addition, some prior art load control systems additionally controlled the positions of the motorized window treatments to prevent sun glare in the space to increase occupant comfort, for example, as described in greater detail in commonly-assigned U.S. Pat. No. 7,950,827, issued May 31, 2011, entitled ELECTRICALLY CONTROLLABLE WINDOW TREATMENT SYSTEM TO CONTROL SUN GLARE IN A SPACE, the entire disclosure of which is hereby incorporated by reference.

One prior art load control system controlled the position of motorized roller shades to limit the sunlight penetration depth in the space to a maximum penetration depth while minimizing movements of the roller shades to minimize occupant distractions, as described in commonly-assigned U.S. Pat. No. 8,288,981, issued Oct. 16, 2012, entitled METHOD OF AUTOMATICALLY CONTROLLING A MOTORIZED WINDOW TREATMENT WHILE MINIMIZING OCCUPANT DISTRACTIONS, the entire disclosure of which is hereby incorporated by reference. Specifically, the load control system controls the position of the motorized roller shades in response to a calculated position of the sun to thus limit the sunlight penetration depth in the space on sunny days. During a cloudy day, the load control system is operable to stop controlling the motorized window treatments to limit the sunlight penetration depth to the maximum penetration depth and to simply adjust the positions of the motorized window treatments to predetermined positions. For example, the load control system may comprise a photosensor (i.e., a daylight sensor or a radiometer) mounted to a window or to the outside of the building for detecting a cloudy condition. The load control system may detect the cloudy condition, for example, if a total light level measured by the photosensor is below a constant threshold TH_(CONST).

FIGS. 1 and 2 show example plots of the total light level L_(SENSOR) measured by the photosensor on a sunny day and a cloudy day, respectively. On both sunny and cloudy days, the total light level L_(SENSOR) measured by the photosensor increases from zero at sunrise (i.e., at time t_(SUNRISE)) and then begins to decrease toward zero at sunset (i.e., at time t_(SUNSET)). On the cloudy day shown in FIG. 2, the total light level L_(SENSOR) measured by the photosensor does not exceed the constant threshold TH_(CONST), such that the load control system controls the motorized window treatments to predetermined positions (i.e., the load control system will not control the motorized window treatments to limit the sunlight penetration depth to the maximum penetration depth at any point in the day). On the sunny day shown in FIG. 1, the load control system begins to control the motorized window treatments to limit the sunlight penetration depth to the maximum penetration depth when the total light level L_(SENSOR) measured by the photosensor exceeds the constant threshold TH_(CONST) at time t_(ENABLE), and then stops controlling the motorized window treatments to limit the sunlight penetration depth to the maximum penetration depth when the total light level L_(SENSOR) measured by the photosensor drops below the constant threshold TH_(CONST) at time t_(DISABLE).

However, on the sunny day near sunrise and sunset as shown in FIG. 1, the load control system may mistakenly conclude that the present day is cloudy when the total light level L_(SENSOR) measured by the photosensor is less than the constant threshold TH_(CONST) (i.e., between t_(SUNRISE) and t_(ENABLE) and between t_(DISABLE) and t_(SUNSET)). At these times, the sun may be very low in the sky and may shine directly into the windows of the building, thus creating glare conditions. Thus, there is a need for a load control system that is able to more accurately distinguish between sunny and cloudy days in order to prevent glare around sunrise and sunset on sunny days.

SUMMARY

In some embodiments, a method of controlling a motorized window treatment is provided for adjusting the amount of sunlight entering a space of a building through a window to control a sunlight penetration distance in the space. The method comprises: (1) measuring a total light intensity at the window; (2) determining if the total light intensity exceeds a cloudy-day threshold; (3) operating in a sunlight penetration limiting mode to control the motorized window treatment to thus control the sunlight penetration distance in the space; (4) enabling the sunlight penetration limiting mode if the total light intensity is greater than the cloudy-day threshold; and (5) disabling the sunlight penetration limiting mode if the total lighting intensity is less than the cloudy-day threshold. According to one embodiment of the present invention, the cloudy-day threshold is maintained at a constant threshold if a calculated solar elevation angle is greater than a predetermined solar elevation angle, and the cloudy-day threshold varies with time if the calculated solar elevation angle is less than the predetermined solar elevation angle. According to another embodiment of the present invention, the cloudy-day threshold is a function of the calculated solar elevation angle if the calculated solar elevation angle is less than the predetermined solar elevation angle.

In some embodiments, a method of controlling a motorized window treatment positioned adjacent to a window on a wall of a building comprises: sampling a total light intensity outside of the building; computing a rate of change of the total light intensity; automatically controlling movement of the window treatment in a sunny operation mode if the computed absolute value of the rate of change is at least a first threshold value; and automatically controlling movement of the window treatment in a cloudy operation mode if the computed absolute value of the rate of change is less than the first threshold value and the total light intensity is less than a second threshold value.

In some embodiments, a method of controlling a motorized window treatment positioned adjacent to a window on a wall of a building comprises: (a) sampling a total light intensity outside of the building; (b) computing a rate of change of the total light intensity; (c) automatically controlling movement of the window treatment based on the total light intensity if the total light intensity is at least a first threshold value; and (d) automatically controlling movement of the window treatment based at least partially on an absolute value of the rate of change of the total light intensity if the total light intensity is less than the first threshold value.

Other features and advantages of the present invention will become apparent from the following description of the invention that refers to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example plot of a total light level measured a photosensor located on a building on a sunny day.

FIG. 2 shows an example plot of a total light level measured a photosensor located on a building on a cloudy day.

FIG. 3 is a simplified block diagram of a load control system having at least one motorized roller shade and a cloudy-day sensor according to an embodiment of the present invention.

FIG. 4 is a simplified side view of an example of a space of a building having a window covered by the motorized roller shade of the load control system of FIG. 3.

FIG. 5A is a side view of the window of FIG. 4 illustrating a sunlight penetration depth.

FIG. 5B is a top view of the window of FIG. 4 when the sun is directly incident upon the window.

FIG. 5C is a top view of the window of FIG. 4 when the sun is not directly incident upon the window.

FIG. 6 shows an example plot of the total light level measured by the cloudy-day sensor of the load control system of FIG. 3 on a sunny day and a cloudy-day threshold according to the embodiment of the present invention.

FIG. 7 is a simplified flowchart of a cloudy-day procedure according to the embodiment of the present invention.

FIG. 8 is a schematic diagram of another embodiment of an automated window treatment system.

FIG. 8A is a block diagram of a sensor used in some embodiments of the motorized window treatment shown in FIG. 8.

FIG. 9 is a flow chart of a method of operating the system of FIG. 8.

FIGS. 10A-10C show alternative details of block 912 of FIG. 9.

FIG. 11 is a detailed flow chart of an embodiment of the method of FIG. 9.

FIGS. 12A-12B show alternative details of the cloudy day operation mode.

FIG. 13A is a flow chart of a variation of the method of FIG. 9.

FIGS. 13B and 13C are alternative diagrams of block 1310 of FIG. 13A.

FIG. 14 is a state diagram showing the permissible state changes between the sunny day mode and cloudy day mode.

FIG. 15 shows an example of the rate-of-change over time, where two thresholds are used to provide hysteresis for change of operating mode.

DETAILED DESCRIPTION

This description of the exemplary embodiments is intended to be read in connection with the accompanying drawings, which are to be considered part of the entire written description. In the description, relative terms such as “lower,” “upper,” “horizontal,” “vertical,”, “above,” “below,” “up,” “down,” “top” and “bottom” as well as derivative thereof (e.g., “horizontally,” “downwardly,” “upwardly,” etc.) should be construed to refer to the orientation as then described or as shown in the drawing under discussion. These relative terms are for convenience of description and do not require that the apparatus be constructed or operated in a particular orientation. Terms concerning attachments, coupling and the like, such as “connected” and “interconnected,” refer to a relationship wherein structures are secured or attached to one another either directly or indirectly through intervening structures, as well as both movable or rigid attachments or relationships, unless expressly described otherwise.

The foregoing summary, as well as the following detailed description of the preferred embodiments, is better understood when read in conjunction with the appended drawings. For the purposes of illustrating the invention, there is shown in the drawings an embodiment that is presently preferred, in which like numerals represent similar parts throughout the several views of the drawings, it being understood, however, that the invention is not limited to the specific methods and instrumentalities disclosed.

FIG. 3 is a simplified block diagram of a load control system 100 according to an embodiment of the present invention. The load control system 100 is operable to control the level of illumination in a space by controlling the intensity level of the electrical lights in the space and the daylight entering the space. As shown in FIG. 3, the load control system 100 is operable to control the amount of power delivered to (and thus the intensity of) a plurality of lighting loads, e.g., a plurality of fluorescent lamps 102. The load control system 100 is further operable to control the position of a plurality of motorized window treatments, e.g., motorized roller shades 104, to control the amount of sunlight entering the space. The motorized window treatments could alternatively comprise motorized draperies, blinds, roman shades, or skylight shades. The load control system comprises a plurality of lighting hubs 140, which act as central controllers for managing the operation of the lighting loads (i.e., the plurality of fluorescent lamps 102) and the motorized window treatments (i.e., the motorized roller shades 104).

Each of the fluorescent lamps 102 is coupled to one of a plurality of digital electronic dimming ballasts 110 for control of the intensities of the lamps. The ballasts 110 are operable to communicate with each other via digital ballast communication links 112 (i.e., the ballasts are operable to transmit digital messages to the other ballasts via the digital ballast communication links). Each digital ballast communication link 112 is also coupled to a digital ballast controller (DBC) 114, which provides the necessary direct-current (DC) voltage to power the communication link 112 and assists in the programming of the load control system 100. For example, the digital ballast communication link 112 may comprise a digital addressable lighting interface (DALI) communication link. The lighting hubs 140 are coupled to the digital ballast controllers 114 via respective lighting hub communication links 142, such that the lighting hubs are operable to transmit digital messages to the ballasts 110.

Each of the motorized roller shades 104 comprises an electronic drive unit (EDU) 130, which may be located, for example, inside a roller tube of the associated roller shade. Each electronic drive units 130 is coupled to one of the lighting hub communication links 142 for receiving digital messages from the respective lighting hub 140. An example of a motorized window treatment control system is described in greater detail in commonly-assigned U.S. Pat. No. 6,983,783, issued Jun. 11, 2006, entitled MOTORIZED SHADE CONTROL SYSTEM, the entire disclosure of which is hereby incorporated by reference. Alternatively, the lighting hubs 140 may be operable to transmit wireless signals, for example, radio-frequency (RF) signals, to the electronic drive units 130 for controlling the motorized roller shades. Examples of a radio-frequency motorized window treatments are described in greater detail in commonly-assigned U.S. Pat. No. 7,723,939, issued May 25, 2010, entitled RADIO-FREQUENCY CONTROLLED MOTORIZED ROLLER SHADE, and U.S. Patent Application Publication No. 2012/0261078, published Oct. 18, 2012, entitled MOTORIZED WINDOW TREATMENT, the entire disclosures of which are hereby incorporated by reference.

The load control system 100 further comprises wallstations 144, 146 coupled to the lighting hub communication links 142 for controlling the load control devices (i.e., the ballasts 110 and the electronic drive units 130) of the load control system. For example, actuations of buttons on the first wallstation 144 may turn one or more of the lamps 102 on and off or adjust the intensities of one or more of the lamps. In addition, actuations of the buttons of the second wallstation 146 may open or close the one or more of the motorized roller shades 104, adjust the positions of one or more of the motorized roller shades, or control one or more of the motorized roller shades to preset shade positions between an open-limit position (e.g., a fully-open position P_(FO)) and a closed-limit position (e.g., a fully-closed position P_(FC)).

The lighting hubs 140 are further coupled to a personal computer (PC) 150 via an a network (e.g., having an Ethernet link 152 and a standard Ethernet switch 154), such that the PC is operable to transmit digital messages to the ballasts 110 and the electronic drive units 130 via the lighting hubs 140. The PC 150 executes a graphical user interface (GUI) software, which is displayed on a PC screen 156. The GUI software allows the user to configure and monitor the operation of the load control system 100. During configuration of the lighting control system 100, the user is operable to determine how many ballasts 110, digital ballast controllers 114, electronic drive units 130, and lighting hubs 140 that are connected and active using the GUI software. Further, the user may also assign one or more of the ballasts 110 to a zone or a group, such that the ballasts 110 in the group respond together to, for example, an actuation of a wallstation. The lighting hubs 140 may also be operable to receive digital messages via the network from a smart phone (e.g., an iPhone® smart phone, an Android® smart phone, or a Blackberry® smart phone), a tablet (e.g., an iPad® hand-held computing device), or any other suitable Internet-Protocol-enabled device.

The load control system 100 may operate in a sunlight penetration limiting mode to control the amount of sunlight entering a space 160 (FIG. 4) of a building to control a sunlight penetration distance d_(PEN) in the space. Specifically, the lighting hubs 140 are operable to transmit digital messages to the motorized roller shades 104 to control the sunlight penetration distance d_(PEN) in the space 160. Each lighting hub 140 comprises an astronomical timeclock and is able to determine the sunrise time t_(SUNRISE) and the sunset time t_(SUNSET) for each day of the year for a specific location. The lighting hubs 140 each transmit commands to the electronic drive units 130 to automatically control the motorized roller shades 104 in response to a timeclock schedule. Alternatively, the PC 150 could comprise the astronomical timeclock and could transmit the digital messages to the motorized roller shades 104 to control the sunlight penetration distance d_(PEN) in the space 160.

The load control system 100 further comprises a cloudy-day sensor 180 that may be mounted to the inside surface of a window 166 (FIG. 4) in the space 160 or to the exterior of the building. The cloudy-day sensor 180 may be battery-powered and may be operable to transmit wireless signals, e.g., radio-frequency (RF) signals 182, to a sensor receiver module 184 as shown in FIG. 3. The sensor receiver module 184 is operable to transmit digital messages to the respective lighting hub 140 via the lighting hub communication link 142 in response to the RF signals 182 from the cloudy-day sensor 180. Accordingly, in response to digital messages received from the cloudy-day sensor 180 via the sensor receiver module 184, the lighting hubs 140 are operable to enable and disable the sunlight penetration limiting mode as will be described in greater detail below. The load control system 100 may comprise a plurality of cloudy-day sensors located at different windows around the building (as well as a plurality of sensor receiver modules), such that the load control system 100 may enable the sunlight penetration limiting mode in some areas of the building and not in others. Alternatively, the cloudy-day sensor 180 may be coupled to the sensor receiver module 184 via a wired control link or directly coupled to the lighting hub communication link 142.

FIG. 4 is a simplified side view of an example of the space 160 illustrating the sunlight penetration distance d_(PEN), which is controlled by the motorized roller shades 104. As shown in FIG. 4, the building comprises a façade 164 (e.g., one side of a four-sided rectangular building) having a window 166 for allowing sunlight to enter the space. The space 160 also comprises a work surface, e.g., a table 168, which has a height h_(WORK). The cloudy-day sensor 180 may be mounted to the inside surface of the window 166 as shown in FIG. 4. The motorized roller shade 104 is mounted above the window 166 and comprises a roller tube 172 around which the shade fabric 170 is wrapped. The shade fabric 170 may have a hembar 174 at the lower edge of the shade fabric. The electronic drive unit 130 rotates the roller tube 172 to move the shade fabric 170 between the fully-open position P_(FO) (in which the window 166 is not covered) and the fully-closed position P_(FC) (in which the window 166 is fully covered). Further, the electronic drive unit 130 may control the position of the shade fabric 170 to one of a plurality of preset positions between the fully-open position P_(FO) and the fully-closed position P_(FC).

The sunlight penetration distance d_(PEN) is the distance from the window 166 and the façade 164 at which direct sunlight shines into the room. The sunlight penetration distance d_(PEN) is a function of a height h_(WIN) of the window 166 and an angle φ_(F) of the façade 164 with respect to true north, as well as a solar elevation angle θ_(S) and a solar azimuth angle φ_(S), which define the position of the sun in the sky. The solar elevation angle θ_(S) and the solar azimuth angle φ_(S) are functions of the present date and time, as well as the position (i.e., the longitude and latitude) of the building 162 in which the space 160 is located. The solar elevation angle θ_(S) is essentially the angle between a line directed towards the sun and a line directed towards the horizon at the position of the building 162. The solar elevation angle θ_(S) can also be thought of as the angle of incidence of the sun's rays on a horizontal surface. The solar azimuth angle φ_(S) is the angle formed by the line from the observer to true north and the line from the observer to the sun projected on the ground. When the solar elevation angle θ_(S) is small (i.e., around sunrise and sunset), small changes in the position of the sun result in relatively large changes in the magnitude of the sunlight penetration distance d_(PEN).

The sunlight penetration distance d_(PEN) of direct sunlight onto the table 168 of the space 160 (which is measured normal to the surface of the window 166) can be determined by considering a triangle formed by the length l of the deepest penetrating ray of light (which is parallel to the path of the ray), the difference between the height h_(WIN) of the window 166 and the height h_(WORK) of the table 168, and distance between the table and the wall of the façade 164 (i.e., the sunlight penetration distance d_(PEN)) as shown in the side view of the window 166 in FIG. 5A, i.e., tan(θ_(S))=(h _(WIN) −h _(WORK))/l  (Equation 1) where θ_(S) is the solar elevation angle of the sun at a given date and time for a given location (i.e., longitude and latitude) of the building.

If the sun is directly incident upon the window 166, a solar azimuth angle φ_(S) and the façade angle φ_(F) (i.e., with respect to true north) are equal as shown by the top view of the window 166 in FIG. 5B. Accordingly, the sunlight penetration distance d_(PEN) equals the length of the deepest penetrating ray of light. However, if the façade angle φ_(F) is not equal to the solar azimuth angle φ_(S), the sunlight penetration distance d_(PEN) is a function of the cosine of the difference between the angle φ_(F) and the solar azimuth angle φ_(S), i.e., d _(PEN) =l·cos(|φ_(F)−φ_(S)|)  (Equation 2) as shown by the top view of the window 166 in FIG. 5C.

As previously mentioned, the solar elevation angle θ_(S) and the solar azimuth angle θ_(S) define the position of the sun in the sky and are functions of the position (i.e., the longitude and latitude) of the building in which the space 160 is located and the present date and time. The following equations are necessary to approximate the solar elevation angle θ_(S) and the solar azimuth angle θ_(S). The equation of time defines essentially the difference in a time as given by a sundial and a time as given by a clock. This difference is due to the obliquity of the Earth's axis of rotation. The equation of time can be approximated by E=9.87·sin(2B)−7.53·cos(B)−1.5·sin(B)  (Equation 3) where B=[360°·(N_(DAY)−81)]/364, and N_(DAY) is the present day-number for the year (e.g., N_(DAY) equals one for January 1, N_(DAY) equals two for January 2, and so on).

The solar declination δ is the angle of incidence of the rays of the sun on the equatorial plane of the Earth. If the eccentricity of Earth's orbit around the sun is ignored and the orbit is assumed to be circular, the solar declination is given by: δ=23.45°·sin [360°/365·(N _(DAY)+284)]  (Equation 4) The solar hour angle H is the angle between the meridian plane and the plane formed by the Earth's axis and current location of the sun, i.e., H(t)={¼·[t+E−(4·λ)+(60·t _(TZ))]}−180°  (Equation 5) where t is the present local time of the day, λ is the local longitude, and t_(TZ) is the time zone difference (in unit of hours) between the local time t and Greenwich Mean Time (GMT). For example, the time zone difference t_(TZ) for the Eastern Standard Time (EST) zone is −5. The time zone difference t_(TZ) can be determined from the local longitude λ and latitude Φ of the building 162. For a given solar hour angle H, the local time can be determined by solving Equation 5 for the time t, i.e., t=720+4·(H+λ)−(60·t _(TZ))−E  (Equation 6) When the solar hour angle H equals zero, the sun is at the highest point in the sky, which is referred to as “solar noon” time t_(SN), i.e., t _(SN)=720+(4·λ)−(60·t _(TZ))−E  (Equation 7) A negative solar hour angle H indicates that the sun is east of the meridian plane (i.e., morning), while a positive solar hour angle H indicates that the sun is west of the meridian plane (i.e., afternoon or evening).

The solar elevation angle θ_(S) as a function of the present local time t can be calculated using the equation: θ_(S)(t)=sin⁻¹[cos(H(t))·cos(δ)·cos(Φ)+sin(δ)·sin(Φ)]  (Equation 8) wherein Φ is the local latitude. The solar azimuth angle Φ_(S) as a function of the present local time t can be calculated using the equation: Φ_(S)(t)=180°·C(t)·cos⁻¹ [X(t)/cos(θ_(S)(t))]  (Equation 9) where X(t)=[cos(H(t))·cos(δ)·sin(Φ)−sin(δ)·cos(Φ)]  (Equation 10) and C(t) equals negative one if the present local time t is less than or equal to the solar noon time t_(SN) or one if the present local time t is greater than the solar noon time t_(SN). The solar azimuth angle Φ_(S) can also be expressed in terms independent of the solar elevation angle θ_(S), i.e., Φ_(S)(t)=tan⁻¹[−sin(H(t))·cos(δ)/Y(t)]  (Equation 11) where Y(t)=[sin(δ)·cos(Φ)−cos(δ)·sin(Φ)·cos(H(t))]  (Equation 12) Thus, the solar elevation angle θ_(S) and the solar azimuth angle φ_(S) are functions of the local longitude λ and latitude Φ and the present local time t and date (i.e., the present day-number N_(DAY)). Using Equations 1 and 2, the sunlight penetration distance can be expressed in terms of the height h_(WIN) of the window 166, the height h_(WORK) of the table 168, the solar elevation angle θ_(S), and the solar solar azimuth angle Φ_(S).

As previously mentioned, the lighting hubs 140 may operate in the sunlight penetration limiting mode to control the motorized roller shades 104 to limit the sunlight penetration distance d_(PEN) to be less than a desired maximum sunlight penetration distance d_(MAX). For example, the sunlight penetration distance d_(PEN) may be limited such that the sunlight does not shine directly on the table 168 to prevent sun glare on the table. The desired maximum sunlight penetration distance d_(MAX) may be entered using the GUI software of the PC 150 and may be stored in memory in each of the lighting hubs 140. In addition, the user may also use the GUI software of the PC 150 to enter and the present date and time, the present timezone, the local longitude λ and latitude Φ of the building, the façade angle φ_(F) for each façade 164 of the building, the height h_(WIN) of the windows 166 in spaces 160 of the building, and the heights h_(WORK) of the workspaces (i.e., tables 168) in the spaces of the building. These operational characteristics (or a subset of these operational characteristics) may also be stored in the memory of each lighting hub 140. Further, the motorized roller shades 104 are also controlled such that distractions to an occupant of the space 160 (i.e., due to movements of the motorized roller shades) are minimized, for example, by only opening and closing each motorized roller shade once each day resulting in only two movements of the shades each day.

The lighting hubs 140 are operable to generate a timeclock schedule defining the desired operation of the motorized roller shades 104 of each of the façades 164 of the building 162 to limit the sunlight penetration distance d_(PEN) in the space 160. For example, the lighting hubs 140 may generate a new timeclock schedule once each day at midnight to limit the sunlight penetration distance d_(PEN) in the space 160 for the next day. The lighting hubs 140 are operable to calculate optimal shade positions of the motorized roller shades 104 in response to the desired maximum sunlight penetration distance d_(MAX) at a plurality of times for the next day. The lighting hubs 140 are then operable to use a user-selected minimum time period T_(MIN) between shade movements as well as the calculated optimal shade positions to generate the timeclock schedule for the next day. Examples of methods of controlling motorized window treatments to minimize sunlight penetration depth using timeclock schedules are described in greater detail in previously-referenced U.S. Pat. No. 8,288,981.

In some cases, when the lighting hub 140 controls the motorized roller shades 104 to the fully-open positions P_(FO) (i.e., when there is no direct sunlight incident on the façade 164), the amount of daylight entering the space 160 may be unacceptable to a user of the space. Therefore, the lighting hub 140 is operable to set the open-limit positions of the motorized roller shades of one or more of the spaces 160 or façades 164 of the building to a visor position P_(VISOR), which is typically lower than the fully-open position P_(FO), but may be equal to the fully-open position. Thus, the visor position P_(VISOR) defines the highest position to which the motorized roller shades 104 will be controlled during the timeclock schedule. The position of the visor position P_(VISOR) may be entered using the GUI software of the PC 150. In addition, the visor position P_(VISOR) may be enabled and disabled for each of the spaces 160 or façades 164 of the building using the GUI software of the PC 150. Since two adjacent windows 166 of the building may have different heights, the visor positions P_(VISOR) of the two windows may be programmed using the GUI software, such that the hembars 174 of the shade fabrics 172 covering the adjacent window are aligned when the motorized roller shades 104 are controlled to the visor positions P_(VISOR).

In response to the RF signals 182 received from the cloudy-day sensor 180, the lighting hubs 140 are operable to disable the sunlight penetration limiting mode (i.e., to stop controlling the motorized roller shades 104 to limit the sunlight penetration distance d_(PEN)). Specifically, if the total light level L_(SENSOR) measured by the cloudy-day sensor 180 is below a cloudy-day threshold TH_(CLOUDY), each lighting hub 140 is operable to determine that cloudy conditions exist outside the building and to control one or more of the motorized roller shades 104 to the visor positions P_(VISOR) in order to maximum the amount of natural light entering the space 160 and to improve occupant comfort by providing a better view out of the window 166. However, if the total light level L_(SENSOR) measured by the cloudy-day sensor 180 is greater than or equal to the cloudy-day threshold TH_(CLOUDY), each lighting hub 140 is operable to determine that sunny conditions exist outside the building and to enable the sunlight penetration limiting mode to control the motorized roller shades 104 to limit the sunlight penetration distance d_(PEN) in the space 160 to thus prevent sun glare on the table 168.

FIG. 6 shows an example plot of the total light level L_(SENSOR) measured by the cloudy-day sensor 180 on a sunny day and the cloudy-day threshold TH_(CLOUDY) used by the lighting hubs 140 according to the embodiment of the present invention. During most of the day, when the calculated solar elevation angle θ_(S) is greater than a predetermined cut-off elevation θ_(CUT-OFF) (e.g., approximately 15°), the cloudy-day threshold TH_(CLOUDY) is maintained constant, for example, at the prior art constant threshold TH_(CONST) (e.g., approximately 1000 foot-candles). To prevent the lighting hubs 140 from mistakenly determining that the present day is a cloudy day around sunrise and sunset, the cloudy-day threshold TH_(CLOUDY) is adjusted as a function of the calculated solar elevation angle θ_(S), e.g.,

$\begin{matrix} {{TH}_{CLOUDY} = {{TH}_{CNST} \cdot \frac{\theta_{S}}{\theta_{{CUT}\text{-}{OFF}}}}} & \left( {{Equation}\mspace{14mu} 13} \right) \end{matrix}$ Accordingly, the cloudy-day threshold TH_(CLOUDY) varies with time near sunrise and sunset, and is maintained at the constant threshold TH_(CONST) near midday. Since the solar elevation angle θ_(S) is approximately linear near sunrise and sunset, the cloudy-day threshold TH_(CLOUDY) is increased somewhat linearly from zero to the cloudy-day threshold TH_(CLOUDY) from the sunrise time t_(SUNRISE) to time t_(ENABLE), and decrease somewhat linearly from the cloudy-day threshold TH_(CLOUDY) to zero from time t_(DISABLE) to the sunset time t_(SUNSET) as shown in FIG. 6. Alternatively, the cloudy-day threshold TH_(CLOUDY) could vary with time for a first predetermined time period after sunrise and a second predetermined time period before sunset.

FIG. 7 is a simplified flowchart of a cloudy-day procedure 300 executed by each lighting hub 140 periodically (e.g., once every minute). First, the lighting hub 140 determines the total light level L_(SENSOR) at step 310, for example, by recalling from memory the last light level information received from the cloudy-day sensor 180. If, at step 311, the total light level L_(SENSOR) has not changed since the last time that the cloudy-day procedure 300 was executed, the cloudy-day procedure 300 simply exits. However, if the total light level L_(SENSOR) has changed at step 311, the lighting hub 140 calculates the solar elevation angle θ_(S) at step 312 (e.g., using equations 1-8 as shown above). If the calculated solar elevation angle θ_(S) is greater than the cut-off elevation θ_(CUT-OFF) (i.e., approximately 15°) at step 314, the lighting hub 140 sets the cloudy-day threshold THCloudy to be equal to the prior art constant threshold TH_(CONST) at step 316. If the calculated solar elevation angle θ_(S) is less than or equal to the cut-off elevation θ_(CUT-OFF) at step 314, the lighting hub 140 calculates the cloudy-day threshold TH_(CLOUDY) as a function of the constant threshold TH_(CONST), the calculated solar elevation angle θ_(S), and the cut-off elevation θ_(CUT-OFF) at step 318 (e.g., as shown in equation 13 above). If, at step 320, the total light level L_(SENSOR) is greater than the cloudy-day threshold TH_(CLOUDY) (as set at step 316 or 318), the lighting hub 140 enables the sunlight penetration limiting mode to control the motorized roller shades 104 according to the timeclock schedule at step 324 (i.e., to limit the sunlight penetration distance d_(PEN) in the space 160), and the cloudy-day procedure 300 exits. If the total light level L_(SENSOR) is less than or equal to the cloudy-day threshold TH_(CLOUDY) at step 320, the lighting hub 140 disables the sunlight penetration limiting mode and controls the motorized roller shades to the visor positions P_(VISOR) at step 324, before the cloudy-day procedure 300 exits.

While the present application has been described with reference to distinguishing between sunny and cloudy days, the concepts of the present application can also be applied to other external conditions that may affect the amount and direction of sunlight entering the space 160, for example, shadow conditions and reflected glare conditions caused by other buildings and objects. For example, the lighting hubs 140 could disable the sunlight penetration limiting mode if the cloudy-day sensor 180 detects that a shadow is on the window 166.

In some embodiments, a method of controlling a motorized window treatment for adjusting the amount of sunlight entering a space of a building through a window to control a sunlight penetration distance in the space, the method comprising:

measuring a total light intensity at the window;

calculating a solar elevation angle;

calculating a cloudy-day threshold as a function of the calculated solar elevation angle;

determining if the total light intensity exceeds the cloudy-day threshold;

operating in a sunlight penetration limiting mode to control the motorized window treatment to thus control the sunlight penetration distance in the space;

enabling the sunlight penetration limiting mode if the total light intensity is greater than the cloudy-day threshold; and

disabling the sunlight penetration limiting mode if the total lighting intensity is less than the cloudy-day threshold.

In some embodiments, the cloudy-day threshold is maintained at a constant threshold if the calculated solar elevation angle is greater than a predetermined solar elevation angle, and the cloudy-day threshold is a function of the calculated solar elevation angle if the calculated solar elevation angle is less than the predetermined solar elevation angle.

Some embodiments further comprise controlling the motorized window treatment to a predetermined position when the sunlight penetration limiting mode is disabled.

FIG. 8 is a schematic diagram of another embodiment of an automatic window treatment system 200, which does not require any externally supplied power, communications, or data. This system 200 can be conveniently installed by a homeowner without performing any wiring. The system does not require the user to input any time or geographic data, or information about the relative position between the window treatment and the sun. The system 200 does not require wireless or wired communications with any other home systems.

System 200 includes a window treatment 104, which may be a roller shade. motorized draperies, blinds, roman shades, skylight shades, or the like. The window treatment 104 is equipped with an power source, such as a receptacle (not shown) for holding a battery 206 and receiving DC power from the battery, to power the motor (not shown) for changing the position of the window treatment 104. In some embodiments, the battery is a commercially available alkaline, NiCd or Lithium ion battery for example. The battery can be re-chargeable or disposable. In other embodiments, the battery is a proprietary internal battery.

The system includes a photosensor 202 which measures the total intensity of the visible light impinging on the photosensor 202. The photosensor 202 may be any of a variety of sensors, such as a photometer, radiometer, photodiode, photoresistor or the like. In some embodiments, the sensor 202 is built into the housing of the window treatment 104. In other embodiments, the photosensor 202 is a separate device which can be installed inside or outside of the window, and connected to the control unit 204 via a wired or wireless connection.

In some embodiments, as shown in FIG. 8A, the photosensor 202 is a “smart device” comprising a sensor 202 a, a microcontroller or embedded processor 202 b, a non-transitory storage medium such as a memory 202 c with instruction and data storage portions, and a bus 202 d connecting the sensor, microcontroller and memory, all contained within a single housing 202 e. In some embodiments, the sensor, microcontroller or embedded processor, memory, and bus are all mounted on a printed circuit board (not shown) in the housing 202 e. In other embodiments, the sensor, microcontroller and memory are contained in separate packages and connected to one another.

The control unit 204 can be a microcontroller or embedded processor programmed with instructions for automatically operating the window treatment 104 to permit light according to a predetermined method, based on the total light intensity and/or the rate of change of the total light intensity. The control unit 204 includes a tangible, non-transitory machine readable storage medium (e.g., flash memory, not shown) encoded with data and computer program code for controlling operation of the window treatment.

FIG. 9 is a flow chart of a method of controlling a motorized window treatment 104 positioned adjacent to a window 208 on a wall of a building.

At step 902, the method samples a total light intensity outside of the building. This measurement is collected by the photosensor 202. If the photosensor 202 is located outside of the building, it samples the light directly. If the photosensor 202 is mounted on the housing of the window treatment 104 inside the building, then the control unit 204 can apply a correction to the sensor output signal to account for the absorptivity and reflectivity of the window, through which the light penetrates to reach the photosensor 202.

At step 904, the control unit 204 computes a rate of change of the total light intensity. The rate of change is determined numerically by dividing a difference between two light intensity values by a relevant time interval. In some embodiments, the difference is computed by directly subtracting a first light intensity signal value from a second light intensity signal value. Using only two light intensity signal values is computationally simple and quick, and provides rapid response to real changes in lighting conditions. However, if only two sensor samples are used, the computed difference can incorporate sensor noise into the rate of change value, and tends to produce more fluctuations in the rate of change function. In other embodiments, the total light intensity samples are summed, averaged, or numerically integrated over a short sampling period (such as one, two or five minutes, for example). Doing so tends to cancel out random noise and reduce the spikes in the computed rate of change values.

At step 906, the control unit 204 determines whether the absolute value of the rate of change is at least a first threshold value. If the absolute value of the rate of change is greater than or equal to the first threshold value, step 912 is performed. If the absolute value of the rate of change is less than the threshold value, step 908 is performed. For example, in some embodiments, the threshold rate of change between sunny and cloudy is 50 to 100 ticks/minute. In other embodiments, other threshold values are used.

At step 908, a second determination is made, whether the total light intensity is at least a second threshold value. If the total light intensity is greater than or equal to the second threshold value, step 912 is performed. The second threshold value is set empirically at a value that is generally exceeded on most sunny days while the solar elevation angle is greater than a threshold angle (for example, but not limited to, 15 degrees). This corresponds to most daylight time, between and excluding sunrise and sunset on sunny days. If the total light intensity is less than the second threshold value, step 910 is performed. In some embodiments, the second threshold may be set at about 600 foot candles, about 1000 foot-candles. or about 1200 foot candles. In some embodiments, a control on the window treatment allows the occupant to select the second threshold value.

At step 910, when the computed absolute value of the rate of change is less than the first threshold value and the total light intensity is less than a second threshold value the control unit 204 automatically controls movement of the window treatment 104 in a cloudy operation mode.

At step 912, when the computed absolute value of the rate of change is at least the first threshold value or the total light intensity is at least a second threshold value, the control unit 204 automatically controls movement of the window treatment in a sunny operation mode. Thus, the control unit 204 automatically controls movement of the window treatment in the sunny operation mode if (1) the computed absolute value of the rate of change is at least the first threshold value or (2) the computed absolute value of the rate of change is less than the first threshold value and the total light intensity is at least the second threshold value.

As noted above, near sunrise and sunset, the total light intensity is relatively low, even on sunny days. If cloudy day detection is based solely on the comparison to a fixed total light intensity value, a sunny condition can be mistakenly identified as cloudy. At these times, the sun may be very low in the sky and may shine directly into the windows of the building, thus creating solar penetration conditions.

The inventors have determined that at sunrise and sunset, even though the total light intensity value is relatively low regardless of sunny or cloudy conditions, the absolute value of the rate of change of the total light intensity tends to be significantly larger on sunny and partially sunny days than on cloudy days. Thus, the method shown in FIG. 9 provides improved discrimination between sunny and partly sunny days on the one hand and cloudy days on the other hand.

FIG. 10A is an enlarged detail of step 912 of FIG. 9. In this embodiment, the window treatment has two possible sunny operation mode positions. At step 1002, a determination is made whether the total intensity of the light is greater than a third threshold value. If so, step 1004 is performed. Otherwise, step 1006 is performed.

At step 1004, the window treatment is moved to a first position (e.g., fully closed, or from 75% to 90% closed), if the total light intensity is at least a third threshold value.

At step 1006, the window treatment is moved to a second position (e.g., fully open, or from 15% to 25% open), if the total light intensity is less than the third threshold value.

FIG. 10B is a detail of another implementation of step 912 of FIG. 9. In step 912B, the window treatment position is varied as a function of the total light intensity.

FIG. 10C is a detail of another implementation of step 912 of FIG. 9. In some embodiments, the window treatment position is varied as a linear function of the total light intensity. Thus, the window treatment position can be determined by an equation such as: Y=Y ₀ +C*(Total Light Intensity), where Y is the window treatment position (e.g., hem bar position for a roller shade, angle for blinds, or the like), Y₀ and C are both constants.

Although FIGS. 10A-10C provide three non-limiting examples of the sunny operation mode which do not require geographic data, solar time, or other externally supplied dynamic data, a variety of sunny operation mode techniques can be used. For example, in systems with communications capability or access to geographic information and solar time, the control unit can control the window treatment in the sunny operation mode to control the solar penetration distance, estimated interior natural light level, estimated interior heat contribution from solar radiation, or the like.

FIG. 11 is a flow chart showing more details of an implementation of the embodiment of FIG. 9.

At step 1102, the photosensor samples a total light intensity outside of the building. If the photosensor 202 is mounted on the housing of the window treatment 104 inside the building, then the control unit 204 can apply a correction to the sensor output signal to account for the absorptivity and reflectivity of the window, through which the light penetrates to reach the photosensor 202.

At step 1104, the light intensity values are summed, numerically integrated or averaged over plural intervals to provide plural intensity values.

In some embodiments, step 1104 computes the average intensity summing or averaging the sampled total light intensity over each of a plurality of intervals to provide a respective intensity value for each respective interval. For example, in one embodiment, the total light intensity signal from the photosensor 202 is sampled every 30 seconds. Each time five new values are sampled (i.e., every 2.5 minutes), an average total light intensity value and an average time for that 2.5 minute interval is computed. Thus, after five minutes, two average total light intensity values have been computed. The first average value is based on five samples with an average time of 1.25 minutes and the second average value is based on five samples with an average time of 3.75 minutes.

At step 1106, the control unit 204 computes a rate of change of the total light intensity. The rate of change is determined numerically by dividing a difference between two average light intensity values by the relevant time interval. In some embodiments, computing the rate of change includes calculating the rate of change as the difference between first and second sampled total light intensities divided by a length of time between sampling the first total light intensity and sampling the second total light intensity.

In the example above, the difference between the two average light intensity values is divided by (3.75−1.25)=2.5 minutes.

In other embodiments, step 1104 sums (or integrates) the light intensity values without calculating an average; and step 1106 compensates by using a higher threshold for the sum of the intensity values. For example, if five intensity values are summed in step 1004 (without dividing the sum by five), then the threshold rate of change value can be multiplied by five, so that the same sunny/cloudy decision will be reached.

At step 1108, the control unit 204 determines whether the absolute value of the rate of change is at least a first threshold value. If the absolute value of the rate of change is greater than or equal to the first threshold value, step 1014 is performed. If the absolute value of the rate of change is less than the threshold value, step 1010 is performed.

At step 1110, a second determination is made, whether the total light intensity is at least a second threshold value. If the total light intensity is greater than or equal to the second threshold value, step 1114 is performed. If the total light intensity is less than the second threshold value, step 1112 is performed.

At step 1112, when the computed absolute value of the rate of change is less than the first threshold value and the total light intensity is less than a second threshold value the control unit 204 automatically controls movement of the window treatment 104 in a cloudy operation mode. In this example, the control unit 204 automatically controls movement of the window treatment 104 to open the window treatment (either fully or to a the greatest extent used by the method.

At step 1114, the control unit 204 automatically controls movement of the window treatment in the sunny operation mode if (1) the computed absolute value of the rate of change is at least the first threshold value or (2) the computed absolute value of the rate of change is less than the first threshold value and the total light intensity is at least the second threshold value. In this example, the window treatment 104 is automatically moved to a closed or (substantially closed) position selected to ensure the comfort of the occupant of the room in which the window treatment system 200 is located.

By summing, integrating or averaging samples of the total light intensity sensor signal over a relatively short period of time (e.g., 2 to 5 minutes), the effects of sensor noise and small deviations in sensor output are reduced. This in turn reduces swings in the computed rate of change of the total light intensity.

FIG. 12A is a flow chart showing operation of the system in the cloudy operation mode.

At step 1202, a determination is made whether the absolute value of the rate of change of the total light intensity is less than a first threshold. If the absolute value of the rate of change is less than the threshold, step 1204 is performed. If the absolute value of the rate of change is greater than or equal to the threshold, step 1206 is performed.

At step 1204 the window treatment is moved to a “visor” position while the computed absolute value of the rate of change is less than the first threshold value. The visor position is a mostly open position (e.g., 75% to 90% open) which maximizes natural light on cloudy days to minimize lighting loads. The dashed arrow indicates that the evaluation of step 1202 is repeated as long as the system operates in the cloudy operation mode.

At step 1206, if the absolute value of the rate of change is greater than or equal to the first threshold, the system changes state to automatically control movement of the window treatment in the sunny operation mode.

FIG. 12B shows another feature which is used in some embodiments during cloudy operation mode. In some embodiments, the system is biased to protect occupant comfort by responding rapidly to close the window treatment if conditions change from cloudy to sunny, while avoiding distractions due to frequent opening and closing of the window treatment. Thus, the steps of FIG. 12B are performed while in the cloudy day mode (i.e., while the absolute value of the rate of change of total light intensity is less than a first threshold.

At step 1212, a third threshold value is input or selected, such that the third threshold is greater than zero, and lower than the first threshold value. The third threshold value divides the cloudy operation mode into two zones. When the absolute value of the rate of change is low (less than the third threshold), the system preserves battery life by computing the rate of change less often. When the absolute value of the rate of change is high (between the third threshold and the first threshold, the rate of change is computed more often. As a result, when the absolute value of the rate of change crosses above the first threshold, there will be a relatively short delay before the rate of change is next computed and the system is transitioned to the sunny operation mode.

At step 1214, the system computes the rate of change and determines whether the absolute value of the rate of change is between zero and the third threshold (low rate of change). If so, the rate of change is low, and step 1218 is performed. If the rate of change is greater than the third threshold, step 1216 is performed.

At step 1216, the frequency of computing the rate of change becomes (or is maintained) larger.

At step 1218, the frequency of computing the rate of change becomes (or is maintained) less frequent.

In some embodiments, step 1216 uses a first constant frequency and step 1218 uses s a second constant frequency, where the first constant frequency is higher than the second constant frequency. In other embodiments, the frequency at which the rate of change is computed is varied as a function of the rate of change. For example, in some embodiments, the frequency of computing the rate of change is a linear function of the rate of change.

FIG. 13A is a flow chart of an alternative program flow for controlling a motorized window treatment positioned adjacent to a window on a wall of a building, in which the total light intensity is evaluated first, and then the rate of change of the total light intensity is evaluated.

At step 1302, a total light intensity is sampled outside of the building.

At step 1304, a determination is made whether the total light intensity is at least a first threshold value. If so, step 1312 is performed. If not, then step 1306 is performed.

At step 1306, a rate of change of the total light intensity is computed.

Steps 1308-1310 automatically control movement of the window treatment based at least partially on a rate of change of the total light intensity if the total light intensity is less than the first threshold value.

At step 1308, a determination is made whether the absolute value of the rate of change is at least a second threshold value. If the absolute value of the rate of change of the total light intensity is at least a second threshold value. step 1312 is performed, for moving the window treatment to a first position. If the absolute value of the rate of change of the total light intensity is less than the second threshold value, step 1310 is performed.

At step 1310, the control unit 204 automatically controls movement of the window treatment in the cloudy operation mode while the total light intensity is less than the first threshold value.

At step 1312,

the control unit 204 automatically controls movement of the window treatment based on the total light intensity if the total light intensity is at least a first threshold value.

FIG. 13B shows an embodiment of step 1310 of FIG. 13A. In step 1310A, the control unit 204 causes the window treatment to move to a second position if the absolute value of the rate of change of the total light intensity is less than the second threshold value. For example, the second position can be an open or “visor” position used in cloudy operation mode.

FIG. 13C shows another embodiment of step 1310 of FIG. 13A. In step 1310B, the control unit 204 causes the window treatment to move the window treatment to a position that varies as a function of the total light intensity if the absolute value of the rate of change of the total light intensity is less than a second threshold value. At sub-step 1311, the control unit calculates a second position as a function of the total light intensity. At sub-step 1313, the control unit 204 causes the window treatment to move to the second position

FIG. 14 is a state diagram showing the two operating modes and the allowable transitions in some embodiments.

When the system is operating in the cloudy operation mode 1402, the system will cause the window treatment to move to a fully open or “visor” position (75% to 90% open) to maximize natural light and views. In some embodiments, the setting (e.g., height) of the window treatment in the cloudy operation mode can be set manually by a user. For example, the user actuates a “program” button or control and moves the window treatment to the desired cloudy day position. In other embodiments, the user can select the cloudy day position from a predetermined set of options using a programming button or control.

Because the window treatment is substantially opened in the cloudy mode, a sudden change in lighting conditions (e.g., the sun emerging from behind a large cloud) can result in glare or discomfort to an occupant. Thus, in some embodiments, the system is biased to respond near immediately to such a change. In some embodiments, as soon as a computation of the rate of change of total light intensity indicates that the absolute value of the rate of changes has increased beyond the relevant rate-of-change threshold, the control unit 204 transitions to the sunny operation mode (state 1404). Similarly, as the total light intensity has increased beyond the total-light-intensity threshold, the system transitions to the sunny operation mode (state 1404). On the other hand, if the rate of change of total light intensity has small oscillations above and below the rate of change threshold, the control unit 204 still assumes that this indicates a sunny day. This bias towards treating uncertain situations as being sunny ensures that the occupant is protected from glare or excessively bright light.

As described above with respect to FIG. 12B, in some embodiments, the frequency of rate of change computations is increased when the absolute value of the rate of change is relatively high (closer to the threshold for changing to the sunny operation mode). This further reduces the delay in performing the next computation of the rate of change after the weather changes, so that the control unit 204 causes transition to the sunny operation mode to occur almost immediately.

In some embodiments, the step of controlling the window treatment in the cloudy day mode includes transitioning to control the window treatment in the sunny day mode immediately upon determining that the absolute value of the rate of change of the total light intensity has increased to at least the first threshold value. Meanwhile, the step of controlling the window treatment in a sunny day mode includes causing the window treatment to remain in a sunny day position for at least a predetermined minimum time period before transitioning to a cloudy day position.

Referring again to FIG. 14, once the system is operating in the sunny operation mode at state 1404, the control unit 204 implements a minimum delay at step 1406 before the system is returned. This minimizes distractions due to too-frequent movement of the shades during partly sunny weather, and prolongs battery life. Thus, the transition back to cloudy mode does not occur until the minimum time between shade movements has passed, and the absolute value of the rate of change is less than the relevant threshold.

FIG. 15 is a diagram of another optional feature which can be included in the control unit 204 to prevent excess distracting movement and battery consumption. The control unit 204 provides hysteresis using two thresholds, TC and TS (instead of a single threshold). When the system is in the cloudy operation mode, the control unit 204 does not transition to the sunny operation mode until the absolute value of the rate of change 1502 of the total light intensity is greater than or equal to a sunny threshold TS (at time t1). When the system is in the sunny operation mode, the control unit 204 does not transition to the cloudy operation mode until the absolute value of the rate of change 1502 of the total light intensity is less than or equal to a cloudy threshold TC. Thus, in either operation mode, to change state to the other operation mode, the absolute value of the rate of change of the light intensity first passes through both thresholds. In some embodiments, two thresholds TC, TS are used in combination with the minimum delay of block 1406 (FIG. 14) described above. In other embodiments, two thresholds TC, TS are used without a minimum delay.

Also shown in FIGS. 14 and 15, for purpose of cloudy day assessment, the absolute value of the rate of change is used. In the case of a perfectly sunny day with no shadows or obstructions, the rate of change will generally be sinusoidal, and will at times be negative. By using the absolute value of the rate of change, sharp transitions are interpreted as an indication of sunny conditions. A sharp transition can occur on a mostly sunny day for example, when the sun goes behind a cloud (large negative rate of change) or emerges from a cloud (large positive rate of change), Both cases involve mostly sunny days, and are treated the same as a clear sunny day, insofar as control based on the rate of change of total light intensity is concerned. Thus for example, between time t2 and t3, the rate of change 1502 becomes increasingly negative. At time t3, when the absolute value of the rate of change 1504 (shown in phantom) increases beyond the sunny operation threshold TS, control unit 204 again transitions to sunny operation mode. At time t4, when the absolute value of the rate of change 1504 (shown in phantom) decreases below the cloudy operation threshold TC, control unit 204 again transitions to cloudy operation mode.

The methods and system described herein may be at least partially embodied in the form of computer-implemented processes and apparatus for practicing those processes. The disclosed methods may also be at least partially embodied in the form of tangible, non-transient machine readable storage media encoded with computer program code. The media may include, for example, RAMs, ROMs, CD-ROMs, DVD-ROMs, BD-ROMs, hard disk drives, flash memories, or any other non-transient machine-readable storage medium, wherein, when the computer program code is loaded into and executed by a computer, the computer becomes an apparatus for practicing the method. The methods may also be at least partially embodied in the form of a computer into which computer program code is loaded and/or executed, such that, the computer becomes a special purpose computer for practicing the methods. When implemented on a general-purpose processor, the computer program code segments configure the processor to create specific logic circuits. The methods may alternatively be at least partially embodied in a digital signal processor formed of application specific integrated circuits for performing the methods.

Although the subject matter has been described in terms of exemplary embodiments, it is not limited thereto. Rather, the appended claims should be construed broadly, to include other variants and embodiments, which may be made by those skilled in the art. 

What is claimed is:
 1. A method of controlling a motorized window treatment for adjusting an amount of sunlight entering a space of a building through a window to control a sunlight penetration distance in the space, the method comprising: measuring a total light intensity at the window; determining if the total light intensity exceeds a cloudy-day threshold; enabling a sunlight penetration limiting mode in response to determining that the total light intensity is greater than the cloudy-day threshold; operating in the sunlight penetration limiting mode to control the motorized window treatment to thus control the sunlight penetration distance in the space, the sunlight penetration limiting mode causing partial opening of the motorized window treatment to a respective calculated position corresponding to each of a plurality of times so as to admit direct sunlight into the space within a predetermined maximum sunlight penetration distance from the window, such that the respective calculated sunlight penetration distance corresponding to each of the plurality of times is below the predetermined maximum sunlight penetration distance; and disabling the sunlight penetration limiting mode in response to determining that the total lighting intensity is less than the cloudy-day threshold; wherein the cloudy-day threshold varies with time during a first period after sunrise and during a second period before sunset, and is maintained at a constant threshold during a third period near midday.
 2. The method of claim 1, wherein the first period has a first predetermined duration and the second period has a second predetermined duration.
 3. The method of claim 1, further comprising: controlling the motorized window treatment to a predetermined position when the sunlight penetration limiting mode is disabled.
 4. The method of claim 1, wherein the first period and the second period are respective periods when a calculated solar elevation angle is less than a predetermined solar elevation angle, and the third period is a period when the calculated solar elevation angle is greater than the predetermined solar elevation angle.
 5. The method of claim 4, wherein the cloudy-day threshold is a function of the calculated solar elevation angle when the calculated solar elevation angle is less than the predetermined solar elevation angle.
 6. The method of claim 5, wherein the cloudy-day threshold is a linear function of the calculated solar elevation angle when the calculated solar elevation angle is less than the predetermined solar elevation angle.
 7. A system comprising: a sensor for measuring a total light intensity at a window of a building; and a processor configured for controlling a motorized window treatment for adjusting an amount of sunlight entering a space of the building through the window to control a sunlight penetration distance in the space, wherein the processor is programmed for: determining if the total light intensity exceeds a cloudy-day threshold; enabling a sunlight penetration limiting mode in response to determining that the total light intensity is greater than the cloudy-day threshold; operating in the sunlight penetration limiting mode to control the motorized window treatment to thus control the sunlight penetration distance in the space, the sunlight penetration limiting mode causing partial opening of the motorized window treatment to a respective calculated position corresponding to each of a plurality of times so as to admit direct sunlight into the space within a predetermined maximum sunlight penetration distance from the window, such that the respective calculated sunlight penetration distance corresponding to each of the plurality of times is below the predetermined maximum sunlight penetration distance; and disabling the sunlight penetration limiting mode in response to determining that the total lighting intensity is less than the cloudy-day threshold; wherein the cloudy-day threshold varies with time during a first period after sunrise and during a second period before sunset, and is maintained at a constant threshold during a third period near midday.
 8. The system of claim 7, wherein the first period and the second period are respective periods when a calculated solar elevation angle is less than a predetermined solar elevation angle, and the third period is a period when the calculated solar elevation angle is greater than the predetermined solar elevation angle.
 9. The system of claim 8, wherein the cloudy-day threshold is a function of the calculated solar elevation angle when the calculated solar elevation angle is less than the predetermined solar elevation angle.
 10. The system of claim 9, wherein the cloudy-day threshold is a linear function of the calculated solar elevation angle when the calculated solar elevation angle is less than the predetermined solar elevation angle.
 11. The system of claim 7, wherein the first period has a first predetermined duration, and the second period has a second predetermined duration.
 12. The system of claim 7, wherein the processor is further programmed for: controlling the motorized window treatment to a predetermined position when the sunlight penetration limiting mode is disabled.
 13. An apparatus comprising: at least one processor; and a computer readable medium communicatively coupled to the at least one processor and having instructions stored thereon that when executed by the at least one processor direct the at least one processor to: determine from a sensor measurement a total light intensity at a window of a building; determine if the total light intensity exceeds a cloudy-day threshold; enable a sunlight penetration limiting mode in response to determining that the total light intensity is greater than the cloudy-day threshold; operate in the sunlight penetration limiting mode to control a motorized window treatment to thus control a sunlight penetration distance of sunlight entering a space of the building through the window, the sunlight penetration limiting mode causing partial opening of the motorized window treatment to a respective calculated position corresponding to each of a plurality of times so as to admit direct sunlight into the space within a predetermined maximum sunlight penetration distance from the window, such that the respective calculated sunlight penetration distance corresponding to each of the plurality of times is below the predetermined maximum sunlight penetration distance; and disable the sunlight penetration limiting mode in response to determining that the total lighting intensity is less than the cloudy-day threshold; wherein the cloudy-day threshold varies with time during a first period after sunrise and during a second period before sunset, and is maintained at a constant threshold during a third period near midday.
 14. The system of claim 13, wherein the first period and the second period are respective periods when a calculated solar elevation angle is less than a predetermined solar elevation angle, and the third period is a period when the calculated solar elevation angle is greater than the predetermined solar elevation angle.
 15. The system of claim 14, wherein the cloudy-day threshold is a function of the calculated solar elevation angle when the calculated solar elevation angle is less than the predetermined solar elevation angle.
 16. The system of claim 15, wherein the cloudy-day threshold is a linear function of the calculated solar elevation angle when the calculated solar elevation angle is less than the predetermined solar elevation angle.
 17. The system of claim 13, wherein the first period has a first predetermined duration, and the second period has a second predetermined duration.
 18. The system of claim 13, wherein the instructions, when executed by the at least one processor, further direct the at least one processor to: control the motorized window treatment to a predetermined position when the sunlight penetration limiting mode is disabled.
 19. A tangible, non-transient computer readable medium having instructions stored thereon that when executed by at least one processor direct the at least one processor to: determine from a sensor measurement a total light intensity at a window of a building; determine if the total light intensity exceeds a cloudy-day threshold; enable a sunlight penetration limiting mode in response to determining that the total light intensity is greater than the cloudy-day threshold; operate in the sunlight penetration limiting mode to control a motorized window treatment to thus control a sunlight penetration distance of sunlight entering a space of the building through the window, the sunlight penetration limiting mode causing partial opening of the motorized window treatment to a respective calculated position corresponding to each of a plurality of times so as to admit direct sunlight into the space within a predetermined maximum sunlight penetration distance from the window, such that the respective calculated sunlight penetration distance corresponding to each of the plurality of times is below the predetermined maximum sunlight penetration distance; and disable the sunlight penetration limiting mode in response to determining that the total lighting intensity is less than the cloudy-day threshold; wherein the cloudy-day threshold varies with time during a first period after sunrise and during a second period before sunset, and is maintained at a constant threshold during a third period near midday.
 20. The system of claim 19, wherein the first period and the second period are respective periods when a calculated solar elevation angle is less than a predetermined solar elevation angle, and the third period is a period when the calculated solar elevation angle is greater than the predetermined solar elevation angle.
 21. The system of claim 20, wherein the cloudy-day threshold is a function of the calculated solar elevation angle when the calculated solar elevation angle is less than the predetermined solar elevation angle.
 22. The system of claim 21, wherein the cloudy-day threshold is a linear function of the calculated solar elevation angle when the calculated solar elevation angle is less than the predetermined solar elevation angle.
 23. The system of claim 19, wherein the first period has a first predetermined duration, and the second period has a second predetermined duration.
 24. The system of claim 19, wherein the instructions, when executed by the at least one processor, further direct the at least one processor to: control the motorized window treatment to a predetermined position when the sunlight penetration limiting mode is disabled. 